#!/usr/bin/env python3
import string
import random
import argparse

parser = argparse.ArgumentParser(
    prog="passwd",
    description="Generate a random password",
    epilog="Past script for generating random passwords.",
)

parser.add_argument('-c', '--count', type=int, default=24,
                    help='Number of password letters to generate. Default is 24.')
parser.add_argument('-n', '--numbers', type=int, default=1,
                    help='Number of password numbers to generate. Default is 1.')
args = parser.parse_args()

for _ in range(args.numbers):
    print(
        "".join(
            [random.choice(
                string.ascii_letters + string.digits + string.punctuation
            )
                for _ in range(args.count)]
        )
    )